{include file=$header_start}
{strip}
<link rel="stylesheet" type="text/css" href="{$siteroot}/templates/default/style/dashboard.css">
<link rel="stylesheet" type="text/css" href="{$siteroot}/templates/default/style/find_job_list.css">
<script type="text/javascript" src="{$siteroot}/greybox/greybox.js"></script>
<link href="{$siteroot}/greybox/greybox.css" rel="stylesheet" type="text/css" media="all" />
{/strip}
{literal}
<script type="text/javascript">
function detailUser(uid)
{
	var GB_ANIMATION = true;
	var url= SITEROOT + '/leads/userdetail?uid=' + uid;
	GB_show("",url,500,500);
	return false;
}

 // For Message
	var GB_ANIMATION = true;
    jQuery(document).ready(function(){
    	jQuery("a.message").click(function(){
        var t = this.title || jQuery(this).text() || this.href;
 			GB_show("",this.href,600,500);
  			return false;
       });
     });
</script>
{/literal}
{include file=$header_end}
<section class="middle_portion">
	<section class="inner_head">Dashboard</section>
    <section class="inner_containstart">
    	<!-- dashboard Left Content Start -->
        	{include file=$cms_left_content}
        <!-- dashboard Left Content End -->
        <!-- dashboard Right Content Start -->
        	<section class="dash_right">
            <section class="title_box">
            	<h4><span class="lF"><a href="{$siteroot}/jobs/myjobs/">My Job</a> >> Interested Users</span><span class="rF"> <a href="{$siteroot}/jobs/myjobs/" class="rF" >Back</a></span><section class="clear"></section></h4>
            	 <section class="clear"></section>
                 
                </section>                             
				{if $msg} <span style="padding:10px">{$msg} </span>{/if}
                <section class="mainbox_findjobs">
                
                <form method="POST" name="frmtradesuserlisting" id="frmtradesuserlisting" >
				<section class="jobleads_manag_box joblistmain">
                	<dl>
                    	<dt class="col11">Suppliers name</dt>
                         <dt class="col22">Industry / Job type</dt>
                        <dt class="col22">Rating</dt>
                        <dt class="col3">Message</dt>
                        <dt class="col44">Action</dt>
                        <section class="clear"></section>
                    </dl>
                    {section name=i loop=$jobsArray}
                    <dl>
                    	<dd class="col11"> <a href="#" onclick="detailUser({$jobsArray[i].userid})">{$jobsArray[i].first_name} {$jobsArray[i].last_name} </a></dd>
                         <dd class="col22">{$cats}</dd>
                        <dd class="col22"> 
                        	<!--<img src="{$siteroot}/templates/default/images/y_star.png" alt="" />
                            <img src="{$siteroot}/templates/default/images/y_star.png" alt="" />
                            <img src="{$siteroot}/templates/default/images/y_star.png" alt="" />
                            <img src="{$siteroot}/templates/default/images/y_star.png" alt="" />
                            <img src="{$siteroot}/templates/default/images/y_star.png" alt="" />-->
                            
                            {section name=j loop=$jobsArray[i].total_rating start=0 max =$jobsArray[i].total_rating}
                                <span class=""><img src="{$siteroot}/templates/default/images/y_star.png" alt=""  class=""/></span>
                            {/section}
                            
                            {section name=k loop=$jobsArray[i].remaining_rating start =0 max=$jobsArray[i].remaining_rating}
                                <span class="star_1"><img src="{$siteroot}/templates/default/images/g_star.png" alt=""  class=""/></span>
                            {/section}
                        
                        </dd>
                        <dd class="col3">
                        	<a href="{$siteroot}/jobs/{$jobID}/{$jobsArray[i].userid}/message/" title="Messages"  class="message" ><img alt="messages" src="{$siteroot}/templates/default/images/msg.png" /></a>
                        </dd>
                        <dd class="col44">
                        	{if $jobsArray[i].status eq 'Open'}
                        		<input type="submit" class="btn" name="accept[{$jobsArray[i].id}]" value="Accept" onclick="javascript:return confirm('Are you sure do you want to accept this user?');" />&nbsp;<input type="submit" class="btn" name="decline[{$jobsArray[i].id}]" value="Decline" onclick="javascript:return confirm('Are you sure do you want to decline this user?');" />
                            {/if}   
                            {if $jobsArray[i].status eq 'Accept'}                
                            	<input type="button" class="btn" name="accept[{$jobsArray[i].id}]" value="Accepted" style="cursor:default"  />
                            {/if}   
                            {if $jobsArray[i].status eq 'Decline'}                
                            	<input type="button" class="btn" name="accept[{$jobsArray[i].id}]" value="Declined" style="cursor:default"   />
                            {/if}   
                             {if $jobsArray[i].status eq 'Completed'}                
                            	<input type="button" class="btn" name="accept[{$jobsArray[i].id}]" value="Completed" style="cursor:default"   />
                            {/if}                                                
                         </dd>
                        <section class="clear"></section>
                    </dl>
                    {sectionelse}
                    	<div class="error" style="padding:10px;text-align:center;">Oops, Sorry there are no user buy lead.</div>
                    {/section}
                    {if $pagenation}
                            <section class="pagna">
                            {$pagenation}
                            </section>
                        {/if}	

                        
                         <section class="clear"></section>
                </section>   
                 <section class="clear"></section>
                 <section class="bgimg_shadow"></section>
                </form>
                
                 	<section class="clear"></section>
                </section>

            </section>
        <!-- dashboard Right Content End -->
        	<section class="clear"></section>
    </section>
</section>
{include file=$footer}